home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / prog / pas_all.zip / TI116.ASC < prev    next >
Text File  |  1991-09-11  |  9KB  |  397 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  10.   VERSION : 2.00x
  11.        OS : ALL
  12.      DATE : May 21, 1986                                 PAGE : 1/6
  13.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  14.  
  15.  
  16.  
  17.  
  18.   This file describes modifications which you can make to versions
  19.   2.00A, 2.00B, or 2.00C of LISTT.PAS which will update them to the
  20.   current version, 2.00D. Since the changes apply to several
  21.   different versions, ignore any modifications that have already
  22.   been made. If you have the CP/M-80 version, you must edit both
  23.   files LISTT.PAS and LISTT2.INC in order to complete the changes.
  24.  
  25.   LISTT 2.00D remedies the following conditions which appeared last
  26.   in version:
  27.  
  28.   1. 2.00A (for MS-DOS only) - failure to see an open- or close-
  29.   comment near the end of a long line resulting in key words not
  30.   capitalized, or directives missed.
  31.  
  32.   2. 2.00A - hang on lines ending in an open-comment.
  33.  
  34.   3. 2.00B - The command line buffer in correctly copied into a
  35.   local variable.
  36.  
  37.   4. 2.00B (for MS-DOS only)
  38.        A) Times between noon and 12:59 P.M. printed as A.M.
  39.        B) Times of 12:?? A.M. or P.M. printed as 00:??.
  40.  
  41.   5. 2.00C (for MS-DOS only) - LISTT failing to close the include
  42.   files resulting in not all of the files being printed.
  43.  
  44.   6. 2.00C - Certain printer escape sequences were not interpreted
  45.   properly.
  46.  
  47.   Important Note:     Replace all version numbers with the current
  48.                       version: 2.00D. There are three instances of
  49.                       the version number throughout the program.
  50.  
  51.  
  52.   In the procedure ListIt:
  53.  
  54.     Change from:
  55.        Line: Buffer;
  56.  
  57.     Change to:
  58.        Line, Remainder: Buffer;   { modification ver. 2.00B }
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  76.   VERSION : 2.00x
  77.        OS : ALL
  78.      DATE : May 21, 1986                                 PAGE : 2/6
  79.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  80.  
  81.  
  82.  
  83.  
  84.   In  procedure UpKeyWords:
  85.  
  86.     Change from:
  87.  
  88.       Var
  89.         First, LL, LK, I, J: Integer;
  90.         PossibleKey: String[MaxKeyLenPlus1];
  91.         Min, Max, Guess: Integer;
  92.         Found: Boolean;
  93.  
  94.     Change to:
  95.       Var
  96.         First, LL, LK, I, J: Integer;
  97.         PossibleKey: String[MaxKeyLenPlus1];
  98.         Min, Max, Guess: Integer;
  99.         Found: Boolean;
  100.         Line1: Buffer;           { addition ver. 2.00B }
  101.  
  102.  
  103.     Change from:
  104.         If Line[Length(Line)]=Chr(254) Then Line[0]:=Pred(Line[0]);
  105.        End  { If UpKeys }
  106.       Else  { Not UpKeys }
  107.        While I<LL Do
  108.        Begin
  109.         Case Line[I] Of
  110.          '{': If ParseState<>Quoted Then ParseState:=Comment;
  111.          '(':  If  (ParseState<>Quoted)  And
  112.                  (Copy(Line,I,2)='(*') Then
  113.                 ParseState:=Comment2;
  114.          '}': If ParseState=Comment Then ParseState:=PreKey;
  115.          '*':  If  (ParseState=Comment2) And
  116.                  (Copy(Line,I,2)='*)') Then
  117.                 ParseState:=PreKey;
  118.          '''': If ParseState=Quoted Then ParseState:=PreKey
  119.  
  120.     Change to:
  121.         If Line[Length(Line)]=Chr(254) Then
  122.           Line[0]:=Pred(Line[0]);
  123.        End; { If UpKeys }
  124.       Line1:=Remainder;
  125.             { addition ver. 2.00B note deletion of Else; }
  126.       If UpKeys And (Line[Length(Line)]='*') Then
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.  
  141.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  142.   VERSION : 2.00x
  143.        OS : ALL
  144.      DATE : May 21, 1986                                 PAGE : 3/6
  145.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  146.  
  147.  
  148.  
  149.  
  150.         Line1:='*'+Line1;  { addition ver. 2.00B }
  151.       If  Not  UpKeys Then Line1:=Line+Remainder;
  152.                            { addition ver. 2.00B }
  153.       I:=1; LL:=Length(Line1)+1; { addition ver. 2.00B }
  154.        While I<LL Do
  155.        Begin
  156.        Case Line1[I] Of        { modification ver. 2.00B }
  157.          '{': If ParseState<>Quoted Then ParseState:=Comment;
  158.          '(':  If  (ParseState<>Quoted) And
  159.                  (Copy(Line1,I,2)='(*') Then
  160.                                  { modification ver. 2.00B }
  161.                 ParseState:=Comment2;
  162.          '*':  If (ParseState=Comment2) And
  163.                  (Copy(Line1,I,2)='*)') Then
  164.                                  { modification ver. 2.00B }
  165.                 ParseState:=PreKey;
  166.          '''': If ParseState=Quoted Then ParseState:=PreKey
  167.  
  168.  
  169.   In the procedure TruncateLine:
  170.  
  171.     Change from:
  172.       Begin
  173.        Remainder:=Copy(Line,LineWidth-Extra+1,200);
  174.        Line:=Copy(Line,1,LineWidth-Extra);
  175.       End
  176.  
  177.     Change to:
  178.       Begin
  179.        Remainder:=Copy(Line,LineWidth-Extra+1,200);
  180.        Line:=Copy(Line,1,LineWidth-Extra);
  181.       End
  182.      Else                { addition ver. 2.00B }
  183.       Remainder := '';     { addition ver. 2.00B }
  184.  
  185.  
  186.   In the procedure ProcessDirectives:
  187.  
  188.     Change from:
  189.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  190.           CheckDirective(Where+1,Temp);
  191.           If Not WasCmd Then Where:=Where+Temp+1;
  192.         End;
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.  
  207.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  208.   VERSION : 2.00x
  209.        OS : ALL
  210.      DATE : May 21, 1986                                 PAGE : 4/6
  211.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  212.  
  213.  
  214.  
  215.  
  216.    '(': Begin
  217.           Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
  218.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  219.           CheckDirective(Where+2,Temp);
  220.           If Not WasCmd Then Where:=Where+Temp+3;
  221.  
  222.     Change to:
  223.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200));
  224.                                        { modification 2.00B }
  225.           CheckDirective(Where+1,Temp);
  226.           If  Not  WasCmd Then  Where:=Where+Temp+2;
  227.                                        { modification 2.00B }
  228.         End;
  229.    '(': Begin
  230.           Temp:=Pos('*)',Copy(Line,Where+2,200))-1;
  231.           If Temp=-1 Then Temp:=Length(Copy(Line,Where+1,200))-1;
  232.                                        { modification 2.00B }
  233.           CheckDirective(Where+2,Temp);
  234.           If  Not  WasCmd Then  Where:=Where+Temp+4;
  235.                                        { modification 2.00B }
  236.  
  237.  
  238.   In the function CommandLineArgument:
  239.  
  240.     Change from:
  241.        Begin
  242.         CLA:='';
  243.         While (J<=Length(CommandLine)) And (CommandLine[J]=' ') Do
  244.         While (J<=Length(CommandLine)) And (CommandLine[J]<>' ') Do
  245.          Begin
  246.           CLA:=CLA+CommandLine[J];
  247.           J:=J+1;
  248.          End;
  249.        End;
  250.  
  251.     Change to:
  252.       Begin
  253.        CLA:='';
  254.        While (J<=Length(CommandLineBuffer)) And
  255.          (CommandLineBuffer[J]='  ')  Do
  256.                                    { modification ver. 2.00B }
  257.        While (J<=Length(CommandLineBuffer)) And
  258.          (CommandLineBuffer[J]<>'  ')  Do
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  274.   VERSION : 2.00x
  275.        OS : ALL
  276.      DATE : May 21, 1986                                 PAGE : 5/6
  277.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  278.  
  279.  
  280.  
  281.  
  282.                                    { modification ver. 2.00B }
  283.         Begin
  284.          CLA:=CLA+CommandLineBuffer[J];
  285.                                    { modification ver. 2.00B }
  286.          J:=J+1;
  287.         End;
  288.       End;
  289.  
  290.  
  291.   In the procedure InitParms:
  292.  
  293.     Change from:
  294.       AM_PM:='am';
  295.       If CH>12 Then
  296.        Begin
  297.         CH:=CH-12;
  298.         AM_PM:='pm';
  299.        End;
  300.       Str(CH:2,Hour);
  301.  
  302.     Change to:
  303.       AM_PM:='am';
  304.       If CH>11 Then  { modification ver. 2.00C }
  305.        Begin
  306.         CH:=CH-12;
  307.         AM_PM:='pm';
  308.        End;
  309.       If CH=0 Then CH:=12; { addition ver. 2.00C }
  310.       Str(CH:2,Hour);
  311.  
  312.  
  313.   In the procedure CheckDirective:
  314.  
  315.     Change from:
  316.         If PageForIncludes And PageStarted Then NewPage;
  317.         CurrentInFileName:=InFileName;
  318.        End; { Else include file was found }
  319.  
  320.     Change to:
  321.         If PageForIncludes And PageStarted Then NewPage;
  322.         CurrentInFileName:=InFileName;
  323.         Close(IncludeFile);   { addition ver. 2.00D }
  324.        End; { Else include file was found }
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.  
  339.   PRODUCT : TURBO TUTOR                                NUMBER : 116
  340.   VERSION : 2.00x
  341.        OS : ALL
  342.      DATE : May 21, 1986                                 PAGE : 6/6
  343.     TITLE : UPDATE - LISTT.PAS FROM VERSION 2.00A, B OR C TO 2.00D
  344.  
  345.  
  346.  
  347.  
  348.   In the function CmdStr:
  349.  
  350.     Change from:
  351.       Function CmdStr: Buffer;
  352.  
  353.       Begin
  354.         CmdStr:=Copy(Line,Where+3,Len-3);
  355.       End;
  356.  
  357.     Change to:
  358.       Function CmdStr: Buffer;
  359.  
  360.       Var            { addition ver. 2.00D }
  361.         S: Buffer;    { addition ver. 2.00D }
  362.  
  363.       Begin
  364.         S:=Copy(Line,Where+3,Len-3);
  365.                                         { modification ver. 2.00D }
  366.         if (Length(S) > 2) and (Copy(S, 1, 2) = '^[') then
  367.                                         { addition ver. 2.00D }
  368.           CmdStr:=#27+Copy(S, 3, Length(S)-2)
  369.                                         { addition ver. 2.00D }
  370.         else                            { addition ver. 2.00D }
  371.           CmdStr:=S;                 { addition ver. 2.00D }
  372.       End;
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.